#include "stdio.h"
//求第n个斐波那契数
int fib(int n)
{
int a = 1;
int b = 1;
int c = 1;
 while(n>2)
     {
       c = a + b;
       a = b;
       b = c;
       n--;
      }
   return c;
}
/*
{
if (n <= 2)
return 1;
else
return fib(n-1)+fib(n-2);

}
*/
int main()
{
    int n = 0;
    scanf("%d",&n);
    int ret = fib(n);
    printf ("%d",ret);

    return 0;
}